import { defHttp } from "@/utils/http";

// 零件类型 API
export const catEqpartsApi = {
	// 查询零件类型分页
	catEqpartsPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/cat-eqparts/page`, params });
	},

	// 新增零件类型
	catEqpartsCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/cat-eqparts/create`, data });
	},

	// 修改零件类型
	catEqpartsuUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/cat-eqparts/update`, data });
	},

	// 删除零件类型
	catEqpartsDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/cat-eqparts/delete?id=` + id });
	}
};
